package com.cmbchina.ccd.config;

import com.cmbchina.ccd.utils.ResponseEntity;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

@ControllerAdvice
public class MyGlobalExceptionHandler {
    @ExceptionHandler(Exception.class)
    public ResponseEntity customException(Exception e) {
        return new ResponseEntity().failure(e.getMessage());
    }
}